package com.xpgk.mvc.collection.collectionServicePart;

import java.io.UnsupportedEncodingException;
import java.util.List;

import com.jfinal.plugin.activerecord.Record;
import com.xpgk.mvc.base.BaseController;

public class CollecttionTodayServedController extends  BaseController{
	
	private CollecttionBinShopServiceService binShopServiceService = new CollecttionBinShopServiceService();
	public void index(){
		List<Record> result = binShopServiceService.getTodayView(getCUserOrganIds(), null, null, null);
		Record record = binShopServiceService.totaloftodayservice(getCUserOrganIds());
		setAttr("resultTotal",record);
		setAttr("resultList", result);
		render("todayServices.html");
	}
	
	public void view() throws UnsupportedEncodingException {
		String name = getPara("name");
		List<Record> result = binShopServiceService.getTodayView(getCUserOrganIds(),name , getPara("phone"),getPara("hybh"));
		setAttr("resultList", result);
		setAttr("customerName",name);
		setAttr("phone", getPara("phone"));
		setAttr("customerHybh", getPara("hybh"));
		render("todayServices.html");
	}
}
